Interacting with Stitch

The Stitch utility class and the rest of the protocols here provide functionality for interacting with a MongoDB Stitch application. None of these classes or protocols are meant to be instantiated directly. All interaction with Stitch begins at the level of the Stitch utility class.

  • Stitch is the singleton class with static utility functions for initializing the SDK.

    Use it to initialize and retrieve a StitchAppClient for your Stitch app.

    See more

    Declaration

    Swift

    public class Stitch
  • StitchAuthDelegate is a protocol to be inherited when you need to take action on authentication events. An instance of a StitchAuthDelegate must be added to a StitchAuth.

    Note

    This protocol uses an extension to provide default implementations. This is for your convenience, so you do not have to implement every method here to satisfy the protocol requirements. This however does mean that if you plan on subclassing your implementation of StitchAuthDelegate, you may run into unexpected issues where the empty default implementation is called instead of your subclass implementation. If this does happen in your code, see this article for more context and potential workarounds, or open an issue in our GitHub repository.

    • Tag: StitchAuthDelegate
    See more

    Declaration

    Swift

    public protocol StitchAuthDelegate : AnyObject
  • StitchPush can be used to get clients that can register for push notifications via Stitch.

    See more

    Declaration

    Swift

    public protocol StitchPush
  • StitchServiceClient acts as a general purpose client for working with services that are not defined or well defined by this SDK. It has methods similar to the callFunction method on StitchAppClient.

    See more

    Declaration

    Swift

    public protocol StitchServiceClient
  • StitchResult holds the result to an asynchronous operation performed against the Stitch server.

    When an operation completes successfully, the StitchResult holds the result of the operation. When the operation fails, the StitchResult contains a StitchError object describing the reason for the failure.

    See more

    Declaration

    Swift

    public enum StitchResult<T>